import App from './App'
import API from "@/api/api";
import { setTitle } from "./utils/setTitle";
import tabBar from '@/components/tabbar.vue'
import bottomBackBtn from '@/components/buttom_back_btn.vue'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
console.log('API',API)
Vue.config.productionTip = false
Vue.prototype.API = API;
Vue.prototype.setTitle = setTitle;
Vue.component('tabBar', tabBar)
Vue.component('bottomBackBtn', bottomBackBtn)

App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App);
  app.component('tabBar', tabBar)
  app.component('bottomBackBtn', bottomBackBtn)
  app.config.globalProperties.API = API;
  app.config.globalProperties.setTitle = setTitle;
  return {
    app,
  };
}
// #endif